/**
  *@File文件:UserRecordService.java
  *@Date日期:2017年7月14日 下午3:51:17
  *@Copyright版权:Corporation 2017
  */
package com.qiaomengapp.serviceImp;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qiaomengapp.bean.UserRecord;
import com.qiaomengapp.dao.UserRecordMapper;
import com.qiaomengapp.exception.CustomException;
import com.qiaomengapp.service.IUserRecordService;

/**
 *@Description描述:
 *@Author作者 jinxin
 *@Date日期:2017年7月14日
 */
@Service
public class ImpUserRecordService implements IUserRecordService{
	@Autowired
	private UserRecordMapper userRecordMapper;
	
	//查询用户资金变动
	public List<UserRecord> select_userRecord(int userId) throws CustomException{
		List<UserRecord> list = userRecordMapper.select_userRecord(userId);
		if(list==null||list.size()==0){
			throw new CustomException("没有找到该用户的资金变动记录");
		}		
		return list;
	}
}
